package com.atguigu.distributed.lock.juc;

public class HelloGC {
    //下列命令默认为windows系统命令行下执行，确保安装有java环境变量
    //下面为jvm的两种类型，布尔型和KV设值型
    //jinfo -flag PrintGCDetails 进程号 res==>-XX:+PrintGCDetails +代表开启，-代表关闭
    //jinfo -flag MetaspaceSize 进程号 res==>-XX:MetaspaceSize=1073741824
    //jinfo -flags 进程号 把所有的参数都查询出来类似于mysql的select * from xxx(表名)
    //res==> Non-default VM flags指jvm根据你的机器配置调整过的参数
    //Command line指的是在人为的手动配置在VM options的参数
    public static void main(String[] args) throws InterruptedException {
        long totalMemory = Runtime.getRuntime().totalMemory();
        long maxMemory = Runtime.getRuntime().maxMemory();
        System.out.println("total_Memory(XMS):"+totalMemory+"(字节)"+(totalMemory/(double)1024/1024)+"MB");
        System.out.println("total_Memory(XMS):"+maxMemory+"(字节)"+(maxMemory/(double)1024/1024)+"MB");
        Thread.sleep(500000);
    }
}
